// src/router/index.js
import { createRouter, createWebHistory } from 'vue-router';
import Home from '../page/Home.vue';
import Login from '../page/Login.vue';
import Detail from '../page/Detail.vue'

// 路由配置
const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
  },
  {
    path: '/detail',
    name: 'Detail',
    component: Detail,
  },
  {
    path: '/login',
    name: 'Login',
    component: Login,
  },
];

// 创建路由实例
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes,
});

export default router;